Defining Standard Prolog in Rewriting Logic

نویسندگان

  • Marija Kulas
  • Christoph Beierle
چکیده

The coincidence between the model-theoretic and the procedural semantics of SLDresolution does not carry over to a Prolog system that also implements non-logical features like cut and whose depth-first search strategy is incomplete. The purpose of this paper is to present the key concepts of a new, simple operational semantics of Standard Prolog in the form of rewriting rules. We use a novel linear representation of the Prolog tree traversal. A derivation is represented at the level of unification and backtracking. The rewriting system presented here can easily be implemented in a rewriting logic language, giving an executable specification of Prolog.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

P-rho-Log: Combining Logic Programming with Conditional Transformation Systems

PρLog extends Prolog by conditional transformations that are controlled by strategies. We give a brief overview of the tool and illustrate its capabilities. 1998 ACM Subject Classification D.1.6 Logic Programming, F.4.2 Grammars and Other Rewriting Systems, D.3.2 Language Classifications

متن کامل

Automated Termination Analysis: From Term Rewriting to Programming Languages

Termination is a crucial property of programs. Therefore, techniques to analyze termination automatically are highly important for program verification. Traditionally, techniques for automated termination analysis were mainly studied for declarative programming paradigms such as logic programming and term rewriting. However, in the last years, several powerful techniques and tools have been dev...

متن کامل

Extending EBG to Term-Rewriting Systems

We show that the familiar explanation-based generalization (EBG) procedure is applicable to a large family of programming languages, including three families of importance to AI: logic programming (such as Prolog); lambda calculus (such as LISP); and combinator languages (such as FP). The main application of this result is to extend the algorithm to domains for which predicate calculus is a poo...

متن کامل

Magically Constraining the Inverse Method Using Dynamic Polarity Assignment

Given a logic program that is terminating and mode-correct in an idealized Prolog interpreter (i.e., in a top-down logic programming engine), a bottom-up logic programming engine can be used to compute exactly the same set of answers as the top-down engine for a given mode-correct query by rewriting the program and the query using the Magic Sets Transformation (MST). In previous work, we have s...

متن کامل

Answers Synthesis for CLP with Negation

Rewrite techniques can be used to execute logic programs in order to avoid some drawbacks of classical Prolog resolution. Logic programs are represented as rewrite programs whose operational mechanism, inspired from Knuth-Bendix completion, allows to prune some unnecessary computations and offers a synthesis ability which enables to represent infinite sets of answers as finite sets of formulas....

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Electr. Notes Theor. Comput. Sci.

دوره 36  شماره 

صفحات  -

تاریخ انتشار 2000